package com.hoyue.dao;

import com.hoyue.bean.WorkDisplay;
import com.hoyue.utils.Page;

import java.sql.SQLException;
import java.util.List;

public interface WorkDisplayDao {

    /**
     * 更新成就栏目
     * @param workDisplay
     * @throws SQLException
     */
    void update(WorkDisplay workDisplay) throws SQLException;


    /**
     * 获取所有成就
     * @return
     * @throws SQLException
     */
    List<WorkDisplay> getAllList() throws SQLException;

    /**
     * 后台添加成就
     * @param workDisplay
     * @throws SQLException
     */
    void addWorkDisplay(WorkDisplay workDisplay) throws SQLException;

    /**
     * 后台更新成就
     * @param id
     * @throws SQLException
     */
    void deleteWorkDisplay(int id) throws SQLException;

    /**
     * 根据ID返回图片路径
     * @param id
     * @return String
     * @throws SQLException
     */
    String getPicPathById(int id) throws SQLException;

    Page<WorkDisplay> getPage(int page, String tableName) throws SQLException;
}
